import Vue from 'vue'
import Router from 'vue-router'
import realTime from '@/components/realTime/realTime'
import newRear from '@/components/realTime/newRear'
import Transit from '@/components/transit.vue'
//父子组件
import Video from '@/components/common/video'

Vue.use(Router)

export default new Router({
  mode: 'history',
  linkActiveClass: 'link-active',
  routes: [
    { path: '/', redirect: { name: 'transit' } },
    { path: '/transit', name: 'transit', component: Transit },
    // 实时信息
    {
      path: '/video',
      name: 'video',
      redirect: 'newRear',
      component: Video,
      children: [
        {
          path: '/newRear',
          name: 'newRear',
          component: newRear
        }
      ]
    },
  ]
})
